/**
 * Created by Administrator on 2018/1/10.
 */

// api数据接口
let baseHost = ''
let fileHost = ''
if (process.env.NODE_ENV === 'production') {
  baseHost = 'https://sy.zx-o.com'
  fileHost = 'https://sy.zx-o.com'
} else {
  baseHost = 'https://sy.zx-o.com'
  fileHost = 'https://sy.zx-o.com'
}

// 请求API
const API = {
  baseHost: baseHost,
  fileHost: fileHost,
  // 登录
  login: `${baseHost}/app/account/login`,
  // 发送验证码
  getValidateCode: `${baseHost}/app/account/getValidateCode`,
  // 验证短信验证码
  validateSMSCode: `${baseHost}/app/account/validateSMSCode`,
  // 注册
  register: `${baseHost}/app/account/register`
}

// 默认配置
const CONFIG = {
  title: 'Demo',
  countdown: 60 // 默认倒计时
}

// Ajax 请求时的自定义查询状态码
const HTTP_STATE = {
  OK: 200,
  ERROR: 500,
  UNAUTHORIZED: 401,
  UNKNOW: -1
}

const Consts = {
  HTTP_STATE,
  API,
  CONFIG
}

export default Consts
